/*
 * @Author: wwssaabb
 * @Date: 2021-08-16 14:38:09
 * @LastEditTime: 2021-08-16 15:03:16
 * @FilePath: \ts_demo\demo\pick.ts
 */
/* 
  type Pick<T, K extends keyof T> = {
    [P in K]: T[P];
  };
*/

interface Eg1{
  name:string,
  age:number,
  sex:string,
  address:string
}

//第一个参数是需要选择的类型，第二个是需要选择类型的key
type Eg2=Pick<Eg1,'name'|'age'>


export {}